package org.javaboy.openfeign.controller;

import org.javaboy.commons.model.User;
import org.javaboy.openfeign.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Autowired
    UserService userService;

    @GetMapping("/hello")
    public void hello() {
        User user = userService.addUser("zhangsan", 99);
        System.out.println("user = " + user);
        User u1 = userService.updateUser(user);
        System.out.println("u1 = " + u1);
        userService.deleteUser(100);
    }
}
